package net.xdclass.listener;

import com.rabbitmq.client.Channel;
import lombok.extern.slf4j.Slf4j;
import net.xdclass.enums.BizCodeEnum;
import net.xdclass.exception.BizException;
import net.xdclass.model.EventMessage;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@RabbitListener(queuesToDeclare = { @Queue("short_link.error.queue") })
@Component
@Slf4j
public class ShortLinkAddErrorListener {
	@RabbitHandler
	public void  shortLinkHandler(EventMessage eventMessage, Message message, Channel channel){
		log.error("告警：监听到消息ShortLinkErrorMQListener eventMessage消息内容:{}",eventMessage);
		log.error("告警：Message:{}",message);
		log.error("告警成功，发送通知短信");
	}
}
